package com.macrosolution.exdebito

/**
 * Message
 * A domain class describes the data object and it's mapping to the database
 */
class Message {

	/* Default (injected) attributes of GORM */
//	Long	id
//	Long	version
	
	/* Automatic timestamping of GORM */
	Date	dateCreated
	Date	lastUpdated
	Long   	userID
	Date	expire
	Date 	dateEnd 	 	 	
	String 	message
	String eventTitle
	String eventIcon
	String eventColor
	List eventUser
	
	static hasMany = [eventUser : EventUser]
	
	static	constraints = {
		message nullable:true
		eventIcon nullable:true
		eventColor nullable:true
		dateEnd nullable:true
		eventUser nullable:true
    }
	
	/*
	 * Methods of the Domain Class
	 */
//	@Override	// Override toString for a nicer / more descriptive UI 
//	public String toString() {
//		return "${name}";
//	}
}
